package com.rulin.asp.business.mapper;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.rulin.asp.business.entity.ErrorQuestionParam;
import com.rulin.asp.business.entity.Question;
import com.rulin.asp.business.entity.QuestionAdminResultRow;
import com.rulin.asp.business.entity.QuestionMyResultRow;
import com.rulin.asp.business.entity.QuestionParam;
import com.rulin.asp.business.entity.QuestionResultRow;
import com.rulin.asp.business.entity.QuestionStatistics;
import com.rulin.asp.business.entity.RepeatQuestion;

@Repository
public interface QuestionMapper {
	int deleteByPrimaryKey(String quesId);

	int insert(Question record);

	Question selectByPrimaryKey(String quesId);

	int updateByPrimaryKeySelective(Question record);

	List<Question> selectByParam(QuestionParam param);// 根据条件查询

	List<QuestionResultRow> selectQuestionByParam(QuestionParam param);// 根据条件查询问题池列表

	List<QuestionMyResultRow> selectMyQuestionByParam(QuestionParam param);// 根据条件查询我的问题（教师端）列表

	List<QuestionAdminResultRow> selectAdminQuestionByParam(QuestionParam param);// 根据条件查询我的问题（管理员）列表

	Integer countQuestionByParam(QuestionParam param);// 根据条件查询问题池列表总条数

	Integer countMyQuestionByParam(QuestionParam param);// 根据条件查询我的问题（教师端）列表总条数

	Integer countAdminQuestionByParam(QuestionParam param);// 根据条件查询我的问题（管理员端）列表总条数

	int deleteQuestionByQuesIds(List<String> ids);// 注销题目

	int updateQuesTypeByQuesIds(List<String> ids);// 更新题目状态为已发布

	List<QuestionStatistics> staticsTodayQuestion();
	
	List<RepeatQuestion> selectRepeatQuestions(ErrorQuestionParam param);//查询重复题目
	
	Integer countTeacherQuestionByParam(QuestionParam param);// 根据条件查询教师端搜索列表总条数
	List<QuestionAdminResultRow> selectTeacherQuestionByParam(QuestionParam param);// 根据条件查询教师搜索列表
	
	List<String> selectQuesPics(String quesId);
	
	List<String> selectReplyPics(String replyId);
}